<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电影推荐助手</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container">
        <header>
            <h1>电影推荐助手</h1>
            <p>发现您可能喜欢的电影</p>
        </header>
        
        <nav>
            <ul>
                <li><a href="{{ url_for('index') }}">首页</a></li>
                <li><a href="{{ url_for('movies') }}">电影列表</a></li>
                <li><a href="{{ url_for('recommendations') }}">为您推荐</a></li>
            </ul>
        </nav>
        
        <div class="search-section">
            <form action="{{ url_for('search') }}" method="post">
                <input type="text" name="query" placeholder="搜索电影、类型或导演...">
                <button type="submit">搜索</button>
            </form>
        </div>
        
        <section class="movie-section">
            <h2>热门电影</h2>
            <div class="movie-grid">
                {% for movie in movies %}
                <div class="movie-card">
                    <a href="{{ url_for('movie_detail', movie_id=movie.id) }}">
                        <div class="movie-title">{{ movie.title }}</div>
                        <div class="movie-info">
                            <span class="movie-year">{{ movie.year }}</span>
                            <span class="movie-genre">{{ movie.genre }}</span>
                        </div>
                    </a>
                </div>
                {% endfor %}
            </div>
            <div class="section-footer">
                <a href="{{ url_for('movies') }}" class="more-btn">查看全部电影</a>
            </div>
        </section>
        
        <section class="features-section">
            <h2>功能特点</h2>
            <div class="features-grid">
                <div class="feature-card">
                    <h3>电影浏览</h3>
                    <p>浏览丰富的电影库，发现各种类型的电影</p>
                </div>
                <div class="feature-card">
                    <h3>评分记录</h3>
                    <p>为您看过的电影评分，帮助系统了解您的喜好</p>
                </div>
                <div class="feature-card">
                    <h3>个性化推荐</h3>
                    <p>基于您的评分历史，获取个性化的电影推荐</p>
                </div>
            </div>
        </section>
        
        <footer>
            <p>© 2025 电影推荐助手 - 为电影爱好者打造的简单推荐系统</p>
        </footer>
    </div>
</body>
</html>